package com.wenx.v3system.modular.cloud.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.Min;

/**
 * 部门操作统一请求DTO
 * 合并所有部门相关操作的请求参数
 */
@Data
@Schema(description = "部门操作请求")
public class DepartmentOperateDto {

    // ========== 通用字段 ==========
    @Schema(description = "部门ID", example = "1001")
    private String departmentId;

    @Schema(description = "用户ID", example = "3001")
    private String userId;

    @Size(max = 500, message = "备注长度不能超过500个字符")
    @Schema(description = "备注", example = "操作备注信息")
    private String remark;

    // ========== 成员管理相关字段 ==========
    @Size(max = 100, message = "职位名称长度不能超过100个字符")
    @Schema(description = "职位", example = "高级工程师")
    private String position;

    // ========== 部门移动相关字段 ==========
    @Schema(description = "目标父部门ID", example = "2001")
    private String targetParentId;

    @Min(value = 0, message = "排序值不能小于0")
    @Schema(description = "目标排序", example = "1")
    private Integer targetSort;

    // ========== 操作类型标识 ==========
    @Schema(description = "操作类型", example = "ADD_MEMBER", 
            allowableValues = {"ADD_MEMBER", "REMOVE_MEMBER", "SET_MANAGER", "MOVE_DEPARTMENT"})
    private String operationType;

}